#ifndef BOOTUSER_H
#define BOOTUSER_H

#include <QWidget>
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include <QSqlTableModel>
#include <QSqlRecord>
#include <QItemSelectionModel>
#include <QString>
#include <QMessageBox>
#include <QDebug>
#include <QDate>
#include <QDateTime>
#include <QTimer>
#include "xlsxdocument.h"
#include "xlsxformat.h"
#include "xlsxcellrange.h"
#include "xlsxchart.h"
#include <QFileDialog>
namespace Ui {
class bootuser;
}

class bootuser : public QWidget
{
    Q_OBJECT

public:
    explicit bootuser(QWidget *parent = nullptr);
    ~bootuser();
public slots:
    void timeUpdate(void);
private slots:
    void on_Teacher_Search_All_clicked();

    void on_Student_Search_All_clicked();

    void on_Student_Del_clicked();

    void on_Teacher_Del_clicked();

    void on_Student_Add_clicked();

    void on_Teacher_Add_clicked();

    void on_Course_Add_clicked();

    void on_Course_Search_All_clicked();

    void on_Course_Del_clicked();

    void on_Course_Search_clicked();

    void on_Course_Save_clicked();

    void on_Course_Cancel_clicked();

    void on_Teacher_Search_clicked();

    void on_Teacher_Save_clicked();

    void on_Teacher_Cancel_clicked();

    void on_Student_Search_clicked();

    void on_Student_Save_clicked();

    void on_Student_Cancel_clicked();

    void on_Exp_Time_Add_clicked();

    void on_Exp_Time_Search_All_clicked();

    void on_Exp_Time_Del_clicked();

    void on_Exp_Time_Save_clicked();

    void on_Exp_Time_Cancel_clicked();

    void on_Class_Search_All_clicked();

    void on_Class_Search_clicked();

    void on_Class_Add_clicked();

    void on_Class_Del_clicked();

    void on_Class_Save_clicked();

    void on_Class_Cancel_clicked();

    void on_Apply_Search_All_clicked();

    void on_Apply_Search_clicked();

    void on_Apply_Add_clicked();

    void on_Apply_Del_clicked();

    void on_Apply_Save_clicked();

    void on_Apply_Cancel_clicked();

    void on_Apply_Output_clicked();

private:
    Ui::bootuser *ui;
    QSqlDatabase db;
    int row;
    QString cmd;//数据库命令
    QString uiName;
    QString uiID;
    QString uiCourseName;
    QString uiCourseID;
    QString uiExpWeek;
    QString uiExpTime;
    QString ExpWeek_db;
    QString ExpTime_db;
    QString uiClassName;
    QString uiExpApply_WeekNumber;
    QString uiExpApply_Week;
    QSqlTableModel *course_model;
    QSqlTableModel *Teacher_model;
    QSqlTableModel *Student_model;
    QSqlTableModel *ExpTime_model;
    QSqlTableModel *Class_model;
    QSqlTableModel *Exp_model;
    QSqlRecord record;
    QItemSelectionModel *select;

};

#endif // BOOTUSER_H
